<script setup>
    import {onMounted,onUnmounted} from 'vue'

    const timer = setInterval(() => {
        console.log("hello");
    },1000)

    onMounted(() => {
        document.querySelector('p').style.color = 'red'
    })


    onUnmounted(() => {
        clearInterval(timer)
    })
</script>
<template>
    <div class="header">
        <p>header</p>
        <my-button></my-button>
    </div>
</template>
<style scoped>
.header {
    width: 100%;
    height: 100px;
    background-color: aquamarine;
    text-align: center;
    line-height: 100px;
}
</style>
